import 'dart:convert';

class ResponseModel<T> {
  int code;
  bool isSuccess;
  int timestamp;
  String msg;
  T data;

  ResponseModel({this.code, this.isSuccess,this.timestamp,this.msg,this.data});

  ResponseModel.fromJson(Map<String, dynamic> x)
      : code = x['code'],
        isSuccess = x['isSuccess'],
        msg = x['msg'],
        data = x['data'],
        timestamp = x['timestamp'];

  Map<String, dynamic> toJson() => {
        'code': code,
        'isSuccess': isSuccess,
        'timestamp': timestamp,
        'msg': msg,
        'data': data,
      };
}
